<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
      xmlns:fn="http://xmlns.jcp.org/jsp/jstl/functions">
<h:head>
  <title><ui:insert name="title">Default title</ui:insert></title>
  <h:outputStylesheet library="bootstrap/css" name="bootstrap.css" />
  <h:outputStylesheet library="bootstrap/css" name="bootstrap-theme.css" />
  <h:outputScript library="jquery" name="jquery-1.9.1.min.js" />
  <h:outputScript library="bootstrap/js" name="bootstrap.min.js" />  
  <script>
        $a = jQuery.noConflict();
        $a(document).ready(function() {
            var heightWindow = $a(window).height();
            var heightBody   = document.body.clientHeight;
            if(heightWindow > heightBody){
                $a("#footer").css('position', 'fixed');
                $a("#footer").css('bottom', '0');
            }                
        });
    </script>
    <ui:insert name="head">
    </ui:insert>
</h:head>

<body>
<ui:debug hotkey="x" rendered="#{initParam['javax.faces.FACELETS_DEVELOPMENT']}"/>

<div>
	<ui:insert name="nav_bar">
		<ui:include src="top_bar.xhtml"/>
		<ui:include src="search_bar.xhtml"/>
	</ui:insert>
</div>


<div class="container">
  <ui:insert name="container">	  	
  </ui:insert>
</div>

<div id="footer" style="padding-top:30px; margin-top:90px; width:100%; background-color: #EEEEEE;" role="footer">
  <ui:insert name="nav_footer" >    	
		<ui:include src="footer.xhtml"/>
  </ui:insert>
</div>

</body>

</html>
